<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>存管</title>

    <!-- Styles -->
    <style>
        html, body {
            background-color: #fff;
            color: #636b6f;
            font-family: 'Raleway', sans-serif;
            font-weight: 100;
            height: 100vh;
            margin: 0;
        }
        input, select {
            width: 100%;
            padding: 5px;
            margin: 5px 0;
            border: 1px solid #aaa;
            box-sizing: border-box;
            border-radius: 5px;
            -moz-box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -webkit-border-radius: 5px;
        }
        .header {
            border: 1px solid #333;
            background: #111;
            color: white;
            font-weight: bold;
            text-shadow: 0 -1px 1px black;
            background-image: linear-gradient(#3C3C3C,#111);
            background-image: -webkit-gradient(linear,left top,left bottom,from(#3C3C3C),to(#111));
            background-image: -moz-linear-gradient(#3C3C3C,#111);
        }
        .header h1 {
            text-align: center;
            font-size: 16px;
            margin: .6em 0;
            padding: 0;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
        .content {
            padding: 15px;
            background: #fff;
        }
        .date{
            margin-top: 20px;
        }

        .weui-btn_primary:not(.weui-btn_disabled):visited {
            color: #FFFFFF;
        }
        .weui-btn_primary {
            background-color: #1AAD19;
        }
        .weui-btn_loading.weui-btn_primary {
            background-color: #179B16;
        }
        .query_botton{
            margin-top: 15px;
            position: relative;
            display: block;
            margin-left: auto;
            margin-right: auto;
            padding-left: 14px;
            padding-right: 14px;
            box-sizing: border-box;
            font-size: 18px;
            text-align: center;
            text-decoration: none;
            color: #FFFFFF;
            line-height: 2.55555556;
            border-radius: 5px;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            overflow: hidden;
        }

        table.gridtable {
            font-family: verdana,arial,sans-serif;
            font-size:11px;
            color:#333333;
            border-width: 1px;
            border-color: #666666;
            border-collapse: collapse;
            width: 100%;
        }
        table.gridtable th {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #dedede;
        }
        table.gridtable td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #ffffff;
            text-align: center;
        }

        .line{
            width: 100%;
            margin: 20px 0;
            border-bottom: 1px dotted  #aaa;
        }

    </style>
</head>

<link href="{{ asset('/css/mobiscroll_002.css') }}" rel="stylesheet" type="text/css">
<link href="{{ '/css/mobiscroll.css' }}" rel="stylesheet" type="text/css">
<link href="{{ asset('/css/mobiscroll_003.css') }}" rel="stylesheet" type="text/css">

<body>
<div class="flex-center position-ref full-height">
    <div class="content">

        <div class="date">
            <label for="start_date">开始日期:</label>
            <input value="{{ $now_date }}" class="" readonly="readonly" name="start_date" id="start_date" type="text">

            <label for="end_date">结束日期:</label>
            <input value="{{ $now_date }}" class="" readonly="readonly" name="end_date" id="end_date" type="text">

            <div class="query_botton weui-btn weui-btn_primary">查询</div>
        </div>
        <div class="line"></div>
        <div class="show-data">

            <table class="gridtable">
                <tr>
                    <th>监管户出金(元)</th>
                    <th>存管系统出金(元)</th>
                    <th>差额</th>
                </tr>
                <tr>
                    <td class="jianguan">1234.19</td>
                    <td class="cunguan">1234.19</td>
                    <td class="chae">19.19</td>
                </tr>
            </table>
        </div>

    </div>
</div>

<script src="{{ asset('/js/jquery.1.7.2.min.js') }}"></script>
<script src="{{ asset('/js/helpers.js') }}"></script>
<script src="{{ asset('/js/mobiscroll_002.js') }}" type="text/javascript"></script>
<script src="{{ asset('/js/mobiscroll_004.js') }}" type="text/javascript"></script>
<script src="{{ asset('/js/mobiscroll.js') }}" type="text/javascript"></script>
<script src="{{ asset('/js/mobiscroll_003.js') }}" type="text/javascript"></script>
<script src="{{ asset('/js/mobiscroll_005.js') }}" type="text/javascript"></script>

<script>
    $(function () {
        var currYear = (new Date()).getFullYear();
        var opt={};
        opt.date = {preset : 'date'};
        opt.datetime = {preset : 'datetime'};
        opt.time = {preset : 'time'};
        opt.default = {
            theme: 'android-ics light', //皮肤样式
            display: 'modal', //显示方式
            mode: 'scroller', //日期选择模式
            dateFormat: 'yyyy-mm-dd',
            lang: 'zh',
            showNow: true,
            nowText: "今天",
            startYear: currYear - 1, //开始年份
            endYear: currYear //结束年份
        };

        $("#end_date").mobiscroll($.extend(opt['date'], opt['default']));
        $("#start_date").mobiscroll($.extend(opt['date'], opt['default']));

        $('.query_botton').click(function(){
            var start_date = $('#start_date').val();
            var end_date = $('#end_date').val();
            var _this = $(this);

            if(_this.hasClass('weui-btn_loading')){
                return ;
            }

            _this.addClass('weui-btn_loading').text('查询中...');

            $.ajax({
                type : 'post',
                url : '{{ url('/show-constrast') }}',
                data : {'start_date' : start_date, 'end_date' : end_date, '_token' : '{{ csrf_token() }}'},
                success : function (res) {
                    _this.removeClass('weui-btn_loading').text('查询');
console.log(res);
                    if(res.code == 200){


                        return ;
                    }
                    showMsg(res.msg);
                },
                error : function () {

                }
            });
        });
    });
</script>

</body>
</html>
